package com.meituan.sdk.model.mlive.anchor.checkDelegation;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 校验授权情况，集采场景
* This file was automatically generated.
*/
@ApiMeta(
    path = "/mlive/anchor/checkDelegation",
    businessId = 50,
    apiVersion = "10001",
    apiName = "check_delegation",
    needAuth = false
)
public class CheckDelegationRequest implements MeituanRequest<Boolean> {
    @NotBlank(message = "providerId不能为空")
    @SerializedName("providerId")
    private String providerId;
    @NotNull(message = "anchorId不能为空")
    @SerializedName("anchorId")
    private Long anchorId;

    public String getProviderId() {
        return providerId;
    }
    public void setProviderId(String providerId) {
        this.providerId = providerId;
    }
    public Long getAnchorId() {
        return anchorId;
    }
    public void setAnchorId(Long anchorId) {
        this.anchorId = anchorId;
    }


    @Override
    public MeituanResponse<Boolean> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<Boolean>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "CheckDelegationRequest{" + "providerId=" + providerId + "," + "anchorId=" + anchorId + "}";
    }
}
